<template>
  <div class="app-container">
      <el-form ref="form" :model="form" label-width="100px">
        <el-row>
          <el-col :span="6">
            <el-form-item label="Id" prop="id">
              <el-input v-model="form.id" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="网站名称：" prop="name">
              <el-input v-model="form.name" placeholder="请填写网站的名称" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="域名：" prop="name">
              <el-input v-model="form.doman_name" placeholder="请填写域名" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="全局关键词：" prop="name">
              <el-input v-model="form.keywords" placeholder="请填写全局关键词" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="全局描述：" prop="name">
              <el-input type="textarea" class="textarea" rows="3" v-model="form.remarks" placeholder="请填写全局描述" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col>
            <el-form-item label="" prop="">
              <el-button type="primary" @click="submit">保存</el-button>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
  </div>
</template>

<script>

  import { getWebsite,updateWebsite } from "@/api/tool/tool";
  import { getToken } from "@/utils/auth";

  export default {
    data() {
      return {
        form: {}
      };
    },
    created() {
      getWebsite().then(rs =>{
        this.form = rs.data;
      })
    },

    methods: {
      submit () {
        updateWebsite(this.form).then(rs =>{
          this.msgSuccess("修改成功");
        })
      }


    }

  };
</script>
<style>
</style>
